package com.myk.game.gobangchess.ai.startzone;

public class BoardCombiner {

    public static int[][] arrayBoardCombine(int[] array, int[][] baseBoard, int color) {
        int[][] output = new int[9][9];
        int n = 0;

        for (int i = 0; i < 9; i++) {
            for (int j = 0; j < 9; j++) {
                if (baseBoard[i][j] == 0) {
                    output[i][j] = color * array[n];
                    n = n + 1;
                } else {
                    output[i][j] = baseBoard[i][j];
                }
            }
        }

        return output;
    }
}
